<?php
namespace BP\Sys;

use BP\En\EntityMyPK;

require_once("BP/En/Map.php");
class FrmReportField extends EntityMyPK {
	public function getFK_MapData () 
	{
		return $this->GetValStrByKey(FrmReportFieldAttr::$FK_MapData);
	}
	public function setFK_MapData ($value) // [String value]
	{
		$this->SetValByKey(FrmReportFieldAttr::$FK_MapData, $value);
	}
	public function getKeyOfEn () 
	{
		return $this->GetValStrByKey(FrmReportFieldAttr::$KeyOfEn);
	}
	public function setKeyOfEn ($value) // [String value]
	{
		$this->SetValByKey(FrmReportFieldAttr::$KeyOfEn, $value);
	}
	public function getName () 
	{
		return $this->GetValStrByKey(FrmReportFieldAttr::$Name);
	}
	public function setName ($value) // [String value]
	{
		$this->SetValByKey(FrmReportFieldAttr::$Name, $value);
	}
	public function getUIWidth () 
	{
		return $this->GetValStrByKey(FrmReportFieldAttr::$UIWidth);
	}
	public function setUIWidth ($value) // [String value]
	{
		$this->SetValByKey(FrmReportFieldAttr::$UIWidth, $value);
	}
	public function getUIVisible () 
	{
		return $this->GetValBooleanByKey(FrmReportFieldAttr::$UIVisible);
	}
	public function setUIVisible ($value) // [boolean value]
	{
		$this->SetValByKey(FrmReportFieldAttr::$UIVisible, $value);
	}
	public function getIdx () 
	{
		return $this->GetValIntByKey(FrmReportFieldAttr::$Idx);
	}
	public function setIdx ($value) // [int value]
	{
		$this->SetValByKey(FrmReportFieldAttr::$Idx, $value);
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($mypk) // [String mypk]
	{
		$me = new self();
		$me->setMyPK($mypk);
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Sys_FrmRePortField", "表单报表");
		$map->Java_SetDepositaryOfEntity($Depositary->None);
		$map->Java_SetDepositaryOfMap($Depositary->Application);
		$map->Java_SetEnType($EnType->Sys);
		$map->AddMyPK();
		$map->AddTBString(FrmReportFieldAttr::$FK_MapData, NULL, "表单编号",  TRUE ,  FALSE , 1, 100, 80);
		$map->AddTBString(FrmReportFieldAttr::$KeyOfEn, NULL, "字段�?",  TRUE ,  FALSE , 1, 100, 100);
		$map->AddTBString(FrmReportFieldAttr::$Name, NULL, "显示中文�?",  TRUE ,  FALSE , 1, 200, 200);
		$map->AddTBString(FrmReportFieldAttr::$UIWidth, "0", "宽度",  TRUE ,  FALSE , 1, 100, 100);
		$map->AddBoolean(FrmReportFieldAttr::$UIVisible,  TRUE , "是否显示",  TRUE ,  TRUE );
		$map->AddTBInt(FrmReportFieldAttr::$Idx, 0, "显示顺序",  TRUE ,  FALSE );
		$this->set_enMap($map);
		return $this->get_enMap();
	}
	protected function beforeUpdateInsertAction () 
	{
		$this->setMyPK((($this->getFK_MapData() . "_") . $this->getKeyOfEn()));
		return parent->beforeUpdateInsertAction();
	}
}
?>
